department1 = 'security'
department2 = 'Python'
depart1_m = 'cq_bomb'
depart2_m = 'qinke'
COURSE_FEES_SEC = 456789.123456
COURSE_FEES_Python = 1234.3456
department_max_len = max(len(department1),len(department2))
depart_max_len = max(len(depart1_m),len(depart2_m))
COURSE_FEES_max_len = max(len(str(round(COURSE_FEES_SEC,2))),len(str(round(COURSE_FEES_Python,2))))

line1 = 'Department1 name:%(department)sManager:%(depart_m)sCOURSE_FEES:%(COURSE_FEES)sThe End!'%{'department':department1.ljust(department_max_len+4, ),\
        'depart_m':depart1_m.ljust(depart_max_len+4, ),'COURSE_FEES':str(round(COURSE_FEES_SEC,2)).ljust(COURSE_FEES_max_len+4, )}
line2 = 'Department2 name:%(department)sManager:%(depart_m)sCOURSE_FEES:%(COURSE_FEES)sThe End!'%{'department':department2.ljust(department_max_len+4, ),\
        'depart_m':depart2_m.ljust(depart_max_len+4, ),'COURSE_FEES':str(round(COURSE_FEES_Python,2)).ljust(COURSE_FEES_max_len+4, )}

length = len(line1)
print('='*length)
print(line1)
print(line2)
print('='*length)


# line1 = 'Department1 name:{department}Manager:{depart_m}COURSE FEES:{COURSE_FEES}The End!'.format(department = \
#      department1.ljust(department_max_len+4, ),depart_m = depart1_m.ljust(depart_max_len+4, ),\
#        COURSE_FEES = str(round(COURSE_FEES_SEC,2)).ljust(COURSE_FEES_max_len+4, ))
# line2 = 'Department2 name:{department}Manager:{depart_m}COURSE FEES:{COURSE_FEES}The End!'.format(department = \
#      department2.ljust(department_max_len+4, ),depart_m = depart2_m.ljust(depart_max_len+4, ),\
#        COURSE_FEES = str(round(COURSE_FEES_Python,2)).ljust(COURSE_FEES_max_len+4, ))



